package server

import (
	"fmt"
	"github.com/jinzhu/gorm"
)

type UserService struct {
	Order *OrderServer `inject:"ServiceConfig.OrderService()"`
	Db    *gorm.DB     `inject:"-"`
}
type blog struct {
	StudentId string `gorm:"column:studentID"`
}

func NewUserService(order *OrderServer) *UserService {
	return &UserService{Order: order}
}

func (this *UserService) GetUserInfo(uid int) {
	useblog := &blog{}
	this.Db.Raw("select studentID from blog_studentor where id =?", uid).First(useblog)
	fmt.Println(useblog)
}
func (this *UserService) GetOrderInfo() string {
	return this.Order.Name()
}
